Point-to-point protocol flow control extension

ABSTRACT

Method and apparatus are disclosed for flow control over Point-to-Point Protocol (PPP) data links. A method of negotiating such flow control between two PPP peers is disclosed, along with methods for operating flow control across a PPP link. In one embodiment, flow control frames carry an IEEE802.3x MAC control frame payload—the PPP implementation repackages such frames as MAC control frames and passes them to a MAC, which performs flow control. In another embodiment, flow control frames allow flow control commands to be applied differently to different service classes such that PPP flow can be controlled on a per-class basis.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to and is a divisional of U.S. patentapplication Ser. No. 10/061,916, filed Jan. 31, 2002, entitledPOINT-TO-POINT PROTOCOL FLOW CONTROL EXTENSION, which is incorporatedherein by reference in its entirety.

FIELD OF THE INVENTION

This invention relates generally to point-to-point data link-layerprotocols, and more specifically to providing flow control at the datalink layer for such protocols.

BACKGROUND OF THE INVENTION

For digital data communication, the functions necessary forcommunication are generally partitioned in a layered architecture. Layer1, the physical layer, describes the electrical or optical signaling,mechanical, and timing characteristics of a data link. Layer 2, the datalink layer, determines how signals transmitted and received by thephysical layer should be interpreted; generally, the data link layerprovides framing, and may also include authentication, network layeraddress negotiation, loopback detection, and multiplexing ofhigher-layer protocols. Layer 3, the network layer, is responsible forend-to-end addressing and routing of packets traversing a network (orcollection of networks) generally consisting of many separate datalinks. Four additional higher layers can provide additional high-levelfunctionality, including packet ordering, ensuring reliabletransmission, error correction, flow control, etc.

The Point-to-Point Protocol (PPP) is a data link layer protocol. It isdescribed in Internet Engineering Task Force (IETF) Request For Comments(RFC) 1661, “The Point-to-Point Protocol (PPP)”, (1994). As described inRFC 1661, PPP provides a method for encapsulating multi-protocoldatagrams, a Link Control Protocol (LCP) for establishing, configuring,and testing a data link, and a family of Network Control Protocols(NCPs) for establishing and configuring different network-layerprotocols.

PPP was initially envisioned for use with low-speed services, includingmodem connections using analog phone lines. It was found, however, thatPPP served a wide variety of connection types, including high-speedlines. For instance, PPP is now deployed for use with SONET (SynchronousOptical Network) physical layer equipment, in what is known as PoS(Packet over SONET). PoS is described in IETF RFC 2615, “PPP overSONET/SDH”, (1999), using HDLC (High-level Data Link Control)-likeframing as described in IETF RFC 1662, “PPP in HDLC-like Framing”,(1994). SONET physical links use an optical carrier with one of severaldefined data signaling speeds. For instance, OC-1, the slowest SONETformat, signals at a rate of 51.84 Mbps (million bits-per-second). OC-12is twelve times as fast, at 622.08 Mbps, and OC-192 is 192 times asfast, at 9,953.28 Mbps, almost ten billion bits per second.

SUMMARY OF THE INVENTION

Historically, the subject of rate control has been viewed as a problemsolved by other data communication layers and not by PPP. In fact, theauthor of RFCs 1661, 1662, and 2615, William Simpson, followed andedited a design document in developing PPP that explicitly teaches thatflow control is a feature not required by a point-to-point protocol:

-   -   Flow control (such as XON/XOFF) is not required. Any        implementation of the ISPPP is expected to be capable of        receiving packets at the full rate Possible for the particular        data link and physical layers used in the implementation. If        higher layers cannot receive packets at the full rate Possible,        it is up to those layers to discard packets or invoke flow        control procedures. As discussed above, end-to-end flow control        is the responsibility of the transport layer. Including flow        control within a point-to-point protocol often causes violation        of the simplicity requirement.        IETF RFC 1547, “Requirements for an Internet Standard        Point-to-Point Protocol”, (1993).

In contrast to this teaching, it is recognized herein that good reasonsnow exist for implementing flow control as part of a point-to-pointprotocol, instead of relying on transport-layer flow control. Inreality, increased signaling speeds now allow situations where a PPPdata link can overwhelm the computing resources used to process the datareceived on that link. This would not generally be the case, e.g., withone 56 Kbps PPP modem connection serving a 500 MHz desktop computer. Butwith a 10 Gbps PoS connection having limited receive buffer capacity, afraction of a second's unavailability for the attached computingresources could cause buffer overflow and data loss. This isparticularly likely to happen where the PoS link serves a node such as apacket router, which typically handles multiple sources of bursty dataand/or is not usually a connection endpoint itself.

Consider, for example, an OC-192 PoS link between two data routerscarrying primarily Internet Protocol (IP) packets. For TCP/IP packets,Transmission Control Protocol (TCP) includes TCP connection end-to-endflow control, which manages a receive buffer at each endpoint. But asingle OC-192 PoS link between the two routers could conceivably carrydata for thousands—even millions—of TCP connections, very few of whichterminate at the same node that the PPP link terminates. As such, theTCP connections cannot effectively control (or even be aware of) thedata rate on any particular intermediate PPP link of their end-to-endpaths. Even if the TCP peers could attempt control, during a TCPend-to-end round-trip latency of a quarter second (for instance), 2.5billion additional bits would arrive at the PPP receiver before a flowcontrol command could cause a flow rate difference. To compound thisflow control problem, many data sources using a PPP link may use atransport control protocol such as the User Datagram Protocol (UDP),which implements no end-to-end flow control.

If bits are simply dropped at a receiver because the network layer couldnot handle them fast enough, significant data losses, retransmission andslow-start inefficiencies, and noticeably degraded service will almostsurely result. And the loss of data may be non-selective when a receivebuffer overflows, such that low-priority and high-priority data have anequal chance of being discarded.

The present disclosure proposes an extension to PPP that is simple,robust, and provides for flow control across a PPP link. In oneembodiment, the existing Link Control Protocol of PPP is extended toallow negotiation of flow control options. Once flow control isnegotiated, a PPP receiver can insert flow control frames in itsoutgoing stream to inform its peer when flow rate should be changed. Theflow control frames can simply be used to request a pause in all flows,or selected flows, at the transmit end. The transmitter, seeing a pausedflow, can ideally implement policies to discard and/or buffer packets soas to cause less disruption than would be caused by discarding packetsat the receive end.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention may be best understood by reading the disclosure withreference to the drawing, wherein:

FIG. 1 illustrates a network segment containing nodes that communicateover PPP links;

FIG. 2 shows a simplified block diagram of a modular router;

FIGS. 3 and 4 contain block diagrams for router line cards according totwo embodiments of the invention;

FIGS. 5-11 show LCP frame formats useful with embodiments of the presentinvention;

FIGS. 12 a-c illustrate link configuration message exchange according toembodiments of the invention;

FIG. 13 shows a PPP flow control frame format according to an embodimentof the invention;

FIG. 14 contains a basic flow chart for Simple Flow Control packetgeneration;

FIG. 15 shows a PPP flow control frame format according to anotherembodiment of the invention;

FIG. 16 contains a basic flow chart for Service Flow Control packetgeneration; and

FIG. 17 contains a basic flow chart for an implementation responding toSimple and Service Flow Control frames.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The preferred embodiments are described below with reference toparticular implementations such as might exist in a high-speed router.Such implementations are exemplary, as a high-speed router is just onetype of packet-processing device that uses point-to-point protocolcommunications and could therefore benefit from the present invention.In general, a “packet-processing device” could be a router, a layer-2switch, a gateway, an agent, a general-purpose computer, or asubcomponent of one of these, such as a line card or a network interfacecard.

As an introduction, FIG. 1 shows a hypothetical network segment 20. Fourrouters 30, 40, 50, and 60 are connected by bi-directional PoS links:router 30 connects to routers 40, 50, and 60 via links 32, 34, 36,respectively; routers 40 and 50 connect via link 42; and routers 50 and60 connect via link 52. It is not necessary to operation of one PoS linkthat each of these links is a PoS link—for example, some links could useISDN or ATM (Asynchronous Transport Mode) circuits, Fast Ethernet,Gigabit Ethernet, or 10-Gigabit Ethernet formats.

Each of routers 30, 40, 50, and 60 typically connects to other networknodes that are not shown in FIG. 1, e.g., via connections 38 shown onrouter 30. These other connected nodes could be any type ofpacket-processing device.

It can be envisioned from FIG. 1 that, depending on the demands of othernodes or partial equipment failure, bottlenecks could develop that wouldcause one of the illustrated routers, for instance router 30, to fallbehind in forwarding packets received on one or more of its high-speedPoS links. Or, one of the peers of router 30 may transmit its traffic,or some class of its traffic, at a rate higher than has been negotiatedfor a given link. Traditionally, router 30 would respond to suchconditions by dropping packets, which may or may not cause the sourcesof those packets to slow down.

A router that has negotiated flow control on a PoS link according to thepresent invention has an option other than merely dropping packets. Forinstance, before—or as—router 30 begins dropping packets wholesale onPoS link 32, it can send a PPP flow control packet to router 40. The PPPflow control packet requests that router 40 pause some or all traffic onlink 32 for a period of time. This may afford router 30 enough time toreduce its buffer fullness. Router 40, to the extent that it hastransmit buffer room, can retain packets during the pause time, orPossibly discard some packets in an intelligent manner.

Because the PPP flow control loop operates over a point-to-point linkthat the two peers have direct control over, the loop can respondquickly to changing conditions at the two nodes. This allows the peersto respond much quicker and more predictably than a discard scheme thatrelies on end-to-end flow control, and may alleviate the need forretransmission or slowing of some flows.

FIG. 2 shows some of the components of router 30 in more detail. Linecard 70 contains physical media ports for PoS links 32 and 34. Line card72 contains other physical media ports, including a port for PoS link36. Line cards 74 and 76 contain physical media ports for supportingother data links, shown collectively as 38. In a modular router, thenumber and types of line cards can be varied to support differentnetworking roles and capacities.

Each line card connects to one or more internal ports on switch fabric78. For instance, line card 70 connects to switch fabric 78 via a portpipe 80, line card 72 connects to switch fabric 78 via a port pipe 82,etc. Switch fabric 78 performs traffic switching that allows each packetto enter the router at one line card port and egress the router on anappropriate egress port.

FIG. 3 shows a partial block diagram for one embodiment of line card 70.An optical fiber 22 connects to optics 90, which contains a lightmodulator for transmitting signals and a receiver for detecting signalstransmitted by a peer. Serializer/deserializer (serdes) 92 creates theanalog electrical waveforms that drive the light modulator from paralleldigital data received on a bus from PoS interface 94. Likewise, serdes92 receives analog electrical waveforms after conversion by the opticalreceiver, detects a digital bitstream in those waveforms, and convertsthe bitstream to parallel digital data. The parallel digital data istransmitted to PoS interface 94 over a bus. Optics 90 and serdes 92 canbe considered together as one example of a physical media port capableof point-to-point full duplex data transfer with a physical media peer.

PoS interface 94 converts data between the serdes parallel format andthe packet processor format, performs other well-known PPP tasks, andparticipates in PPP flow control as will be described shortly. When PoSinterface 94 receives an egress packet from packet processor 96, itgenerates a frame check sequence (FCS), adds the FCS and flags thebeginning/end of the frame, performs byte and bit stuffing as required,scrambles the data, and places the scrambled data in the appropriateSONET framing format. SONET-framed data is presented to serdes 92 fortransmission over the optical link. As PoS interface 94 receives PoSdata from serdes 92, it decodes the SONET framing and reverses theprocess above to supply ingress packets to packet processor 96.

Packet processor 96 works in conjunction with packet classifier 98 andcontent-addressable memory (CAM) 100 to perform packet routing and otherpacket header updating for each packet received. Ingress packets alsoreceive a backplane header that aids in traffic shaping, queuing, androuting across the switch fabric. Packet processor 96 strips thebackplane header for egress packets and places them in a format expectby PoS interface 94.

When ingress packets leave packet processor 96, they pass through a FIFObuffer 102 to ingress traffic manager 104. Ingress traffic manager 104polices incoming traffic, drops packets as necessary to keep trafficwithin a designated profile, and queues packets bound for the switchfabric in ingress queue memory 108. As switch fabric queues fill,ingress traffic manager 104 notifies a switch fabric scheduler (notshown) of pending traffic via scheduler interface 112. The schedulernotifies traffic manager 104 when to supply traffic from each queue toserdes 114 for switching through the switch fabric.

Egress traffic manager 106 performs analogous functions for egresstraffic received from the switch fabric via serdes 114. Egress queuememory 110 stores egress-side packets in queues for scheduling to packetprocessor 96.

FIG. 3 shows two additional control lines useful with one embodiment ofthe invention. Control line 120 allows ingress traffic manager 104 tosignal flow controller 118 whenever a flow control packet could helpreduce congestion in ingress queue memory 108. Control line 122 allowsflow controller 118 to signal egress traffic manager 106 when a PPP flowcontrol packet has been received from a peer. After introduction ofexemplary PPP flow control formats and option negotiation, operation ofthis embodiment will be further explained.

FIG. 4 is identical in most respects to FIG. 3. But in FIG. 4, packetprocessor 96 has been identified as a packet processor 116 that includesan IEEE802.3 Media Access Controller (as used herein, IEEE802.3 refersto the group of well-known standards promulgated by the Institute ofElectrical and Electronics Engineers, referred to by the numberingprefix “802.3”, and defining what is often referred to as “Ethernet”protocol). Although IEEE802.3 is not technically a point-to-pointprotocol, IEEE standard 802.3x (“IEEE802.3x”) does provide a rudimentaryflow control functionality that is exploited in the embodiment of FIG.4. In this embodiment, flow controller 118 processes received PPP flowcontrol packets by repackaging them in a format recognizable by theIEEE802.3 MAC and passing them to packet processor 116. The IEEE802.3MAC recognizes the packets as if they had come from an IEEE802.3 MACpeer and pauses the outgoing packet stream accordingly.

Likewise, the IEEE802.3 MAC can generate IEEE802.3x MAC control frameswhen a pause in incoming packet flow is desired. Flow controller 118captures such packets, repackages them (if PPP flow control has beennegotiated), and sends them to a PPP peer.

FIGS. 5 through 11 illustrate packet formats useful with someembodiments of the invention. FIG. 5 shows a PPP frame conforming to RFC1662. Flag sequences 152 and 166 contain the octet 0x7e (where theprefix 0x designates hexadecimal notation). The flag sequences delineatethe beginning and end of a PPP frame. Address field 154 and controlfield 156 are also set to specific values (0xff and 0x03, respectively)that identify a valid PPP frame. Protocol field 158 identifies theprotocol to be applied to payload 160, which can, e.g., contain an IPdatagram. Padding 162 can be used as appropriate, and is followed by aFCS 164 that provides error detection.

In addition to encapsulating IP and other datagrams, a PPPimplementation can insert frames in an outgoing data stream—withprotocol fields to designate that such frames contain a directcommunication to a PPP peer. One example of such a protocol is LinkControl Protocol (LCP), which is defined in RFC 1661. LCP frames havetheir protocol field set to 0xc021, and contain a message to the PPPpeer in their payload. Among other things, these messages are used tonegotiate the configuration of a PPP link.

FIG. 6 shows one type of LCP frame that can be generated by a deviceoperating according to an embodiment of the invention. Frame 170illustrates a Configure-Request LCP frame—a PPP implementation receivingframe 170 recognizes it as such by the LCP protocol in protocol field158 and the LCP code 0x01 in code field 171. The identifier field 174contains a value that distinguishes the Configure-Request frame fromother Configure-Request frames that the originator may have recentlysent. The length field 176 allows the receiver to know when to stopreading options from the message.

The Configure-Request frame contain options that pertain to the framesreceived by the sender of the request. Many options have defaults, whichwill be used if an option is not included in a Configure-Request frame.Those options that are present are to be presented in ascended orderaccording to option type. In the example of FIG. 6, three unspecifiedoptions 178, 179, and 180 are shown preceding a new option, which isillustrated in field 182 as having a type 0x09 corresponding to a newflow control option. If the flow control option is missing from aConfigure-Request frame, the default behavior is no flow control. If theoption is present, the sender is requesting the ability to send flowcontrol frames to regulate its inflow of data frames.

Upon receiving a Configure-Request with a flow control option, a PPPimplementation has three choices, illustrated by FIGS. 7, 8, and 9,respectively. If the PPP implementation accepts all of the requestedconfiguration parameters, it returns a Configure-Ack LCP frame 190 toits peer, with the same identifier as the Configure-Request frame, andthe same options that were requested. Upon receiving frame 190, theconfiguration-requesting node has successfully negotiated a flow-controloption that allows it to send flow control frames to its peer.

In some situations, a PPP implementation may be willing to accept flowcontrol instruction, but not according to the option requested in frame170. In such a situation—and assuming that the other options in frame170 are acceptable—the appropriate response is to return a Configure-NakLCP frame 200. The Configure-Nak frame contains the rejected flowcontrol option, but fields 204 and 206 will pertain not to the originaloption parameters of fields 184 and 186, but to a new set of optionparameters that would be acceptable to the peer. More than one set ofoption parameters could exist in the Configure-Nak frame, if more thanone set is acceptable.

Another Possible response to a Configure-Request frame is illustrated byConfigure-Reject LCP frame 210 in FIG. 9. The Configure-Reject frameinstructs the Configure-Request sender that one (or more) of therequested options cannot be negotiated or cannot be recognized, e.g., inthe present illustration when the peer does not have flow controlcapability. The unacceptable option is returned in field 212.

At least two different types of flow control options are envisioned forthe LCP protocol—Simple Flow Control and Service Flow Control. FIG. 10shows a typical Simple Flow Control Option field 182 with itsappurtenant fields 184 and 186. Option length field 184 contains thelength in octets of the entire option, including fields 182, 184, and186. Field 186, the option payload, contains two nested informationareas. Flow control type field 222 contains the value 0x01, whichindicates this is a Simple Flow Control option request. Flow controllength field 224 contains the length in octets of the flow controloption payload, including fields 222, 224, 226, and 228. Field 228contains the Simple Flow Control option parameters.

Within field 228, a Simple Flow Control type field 230 must have thevalue 0x01, which means that the flow control type is a pause time out(the protocol could be expanded to include other types of Simple FlowControl, such as percent rate reduction, by adding other valid typevalues). Simple Flow Control length field 232 contains the length inoctets of field 228. Pause Time Out field 236 contains the number ofbyte times that a pause time out can occupy, where a “byte time” isdefined as 8/(link speed in bps).

FIG. 11 shows a typical Service Flow Control Option field 182 with itsappurtenant fields 184 and 186. Flow control type field 222 contains thevalue 0x02, which indicates that this is a Service Flow Control optionrequest. Fields 242, 244, and 246 contain the Service Flow Controloption parameters, each of these fields representing a service class.This allows the peers to negotiate a number of service class IDs, thepriority associated with each ID, and the flow control behavior for eachID. Up to sixteen service class IDs and priority values can be assignedin the illustrated format.

Considering field 246 as exemplary, sub-field 248 indicates the ServiceFlow Control option format followed in field 246—in this case, theService Class option 0x01 (other option classes could also be defined).Service Flow Contact length sub-field 250 indicates the total length offield 246. Priority field 254 indicates the priority assigned to theservice class indicated in Service ID (SID) field 256. Finally, pausetime out sub-field 258 contains the number of byte times that a pausetime out can occupy, where a “byte time” is defined as 8/(link speed inbps). In this format, up to sixteen priorities and sixteen SIDs can bedefined. The priorities and SIDs need not map one-to-one.

With packets, flow control options, and option parameter formatsdescribed, several exemplary LCP option negotiation sessions will now bedescribed. FIG. 12 a illustrates a negotiation session between two PPPpeers, Node1 and Node2, that each implement Simple Flow Control andService Flow Control as described above. During options negotiation,Node1 sends Configure-Request frame F1 to Node2. Frame F1 requests bothSimple Flow Control and Service Flow Control (PFCP) be allowed. Frame F1may contain other PPP options as well, but these have been omitted forclarity. As these requests are acceptable to Node2, Node2 returnsConfigure-Ack frame F2, repeating the identifier and options of frameF1. Node1 then knows that it can send either Simple Flow Control orService Flow Control frames to Node2 during this session.

Node2 negotiates the parameters for its end of the link by sending FCPframe F3 to Node1, requesting only Simple Flow Control capability.Although Node1 could handle Service Flow Control, it agrees to respondto only Simple Flow Control frames by repeating the parameters of frameF3 in Configure-Ack frame F4.

FIG. 12 b illustrates an LCP option negotiation session where Node2cannot operate according to the Service Flow Control protocol. Node1,unaware of this, sends Configure-Request frame F1 to Node2 to requestfour-class Service Flow Control. Node2 refuses the request bytransmitting a return Configure-Nak frame F2. Frame F2 contains a flowcontrol option with parameters that would be acceptable to Node2, e.g.,Simple Flow Control with a suggested Pause Time. The Pause Time could,for instance, correspond to the available transmit buffer space thatNode2 could use to buffer frames during a pause. Node1 transmits a newConfigure-Request frame F3, including the Simple Flow Control parametersreceived in frame F2. Node2 accepts the options of frame F3 by returninga Configure-Ack frame F4. Node2 also negotiates Simple Flow Control forits end of the link as shown in frames F5 and F6, in similar fashion tothe previous example.

FIG. 12 c illustrates an LCP option negotiation session where Node2either does not recognize or refuses to participate in flow control.Node1, unaware of this, sends Configure-Request frame F1 to Node2 torequest Simple Flow Control. Node2 returns Configure-Reject frame F2,repeating the flow control option to inform Node1 that it will notaccept any flow control option. Unless Node1 wants to drop theconnection, it must transmit a new Configure-Request frame F3 thatcontains no flow control option. As this is of course acceptable toNode2, Node2 returns a Configure-Ack packet F4. Node2 also negotiatesits end of the link with Configure-Request frame F5, which contains noflow control option. As the default behavior is no flow control, Node1returns a Configure-Ack packet F6 and neither end of the link will useflow control.

As illustrated by the above examples, the proposed flow controlextensions to the LCP protocol can provide a simple, robust, and orderlyprocess for negotiating PPP flow control, even when the PPP nodes havedifferent (or no) flow control capability.

Assuming that PPP flow control has been negotiated, a conformingendpoint can then generate and respond to PPP flow control frames, aswill now be described. Although one protocol type could, in someembodiments, be used for both Simple and Service Flow Control, there canbe advantages to having separate protocol types for Simple and ServiceFlow Control.

In one embodiment, Simple Flow Control has its own PPP protocol, whichwill be referred to as SFCP. The value for this protocol, e.g., 0xc4c1,is inserted in protocol field 158 of FIG. 5, and the flow controlpayload is inserted in payload field 160. Referring to FIG. 13, the SFCPpayload 160 is illustrated with four fields 270, 272, 274, and 276. Thispayload is, not coincidentally, the same payload carried by anIEEE802.3x PAUSE frame (albeit without a MAC header). MacControl field270 contains the opcode 0x0001, which to an IEEE802.3 MAC signifies aPAUSE frame. PauseTime field 272 contains a request for a time to pausetraffic, expressed in 512-bit times. Fields 274 and 276 contain paddingexpected by an IEEE802.3 MAC.

With a device like that of FIG. 3, SFCP frames can be generated withflow controller 118 and PoS interface 94 according to flowchart 300 ofFIG. 14. At block 302, flow controller 118 receives notification ofreceive buffer fullness over signal line 120, e.g., as a valueBufferLevel. Block 304 compares BufferLevel to a threshold T. IfBufferLevel is below T, control is transferred to block 308, whichplaces the flow control loop in a wait state until it is time toreevaluate BufferLevel. But if BufferLevel is above T, control istransferred to block 306, which causes a PPP frame with a payload likethat of FIG. 13 to be generated and placed in the PPP output stream.

Although signal line 120 is shown in FIG. 3 as originating from ingresstraffic manager 104 and terminating at flow controller 118 within PoS94, many other Possibilities exist. The flow controller could residewithin PoS interface 94, within the ingress traffic manager, or withinpacket processor 96. The buffer of interest could be queue memory 108,FIFO 102, or an internal buffer within one of blocks 94, 96, or 104.

In one implementation, exemplified by FIG. 4, packet processor 116comprises an IEEE802.3 MAC capable of generating IEEE802.3x controlframes. Due to the intervening PPP link, the MAC cannot communicate withan IEEE802.3x peer at the other end of the link-indeed, it is possiblethat no such peer exists even if it were possible to peer across the PPPlink. But if so enabled, the MAC can generate IEEE802.3x control frames.PoS interface 94 scans for such frames: if SFCP is disabled, PoSinterface 94 removes these MAC control frames from the outgoing datastream; if SFCP is enabled, it extracts the IEEE802.3x payload from theMAC control frame, repackages it as a PPP SFCP frame, and transmits itto the peer.

The logic that causes generation of a SFCP frame could have varyingdegrees of complexity beyond a simple one-threshold comparison. Forinstance, if the threshold is surpassed, the generated PauseTime couldbe a function of how far the threshold is surpassed. Multiple PauseTimevalues could be paired with multiple thresholds. Or the rate of changeof the variable BufferLevel could be calculated and used to evaluatewhen to generate an SFCP frame. The round-trip latency of the link couldbe estimated, e.g., during LCP link initialization, and used as aparameter in the frame-generation logic. The logic may not even relateto buffer fullness at all, but to another measure, such as whether thePPP peer is exceeding an allocated average flow rate.

In one embodiment, Service Flow Control also has its own PPP protocol,which will be referred to as PFCP (Priority Flow Control Protocol). Thevalue for this protocol, e.g., 0xc4c3, is inserted in protocol field 158of FIG. 5, and the flow control payload is inserted in payload field160. Referring to FIG. 15, the PFCP payload 160 is illustrated withfixed-length fields 280, 282, and 284, and a variable-length fieldcomprising fields 286 and 288. Type field 280 must contain the value0x01, which corresponds to a Service Pause format (other formats can ofcourse be devised for other schemes). Length field 282 indicates thetotal length of payload 160 in octets. Service fields 286 and 288 haveidentical formats, but in a given packet will pertain to differentservice classes. The number of such fields in payload 160 can varybetween one and sixteen in the disclosed implementation. The PFCPreceiver can detect the number of fields present from length field 282.

Considering service field 288 as exemplary, it contains two sub-fields290 and 292. Sub-field 290 contains a valid SID. Sub-field 292 containsa corresponding PauseTime for that SID, expressed in byte times. Zero isa valid value for sub-field 292, and indicates that the correspondingSID may restart transmission immediately (if paused).

With a device like that of FIG. 3, PFCP frames can be generated withflow controller 118 and PoS interface 94 according to flowchart 350 ofFIG. 16. At block 352, flow controller 118 receives notification ofreceive buffer fullness over signal line 120, e.g., as a valueBufferLevel, and sets a counter value n to zero. Blocks 354, 356, and358 comprise a loop that compares BufferLevel to thresholds from athreshold array T[n], with an array size ServiceClassSize equal to thenumber of negotiated service classes. At block 354, if BufferLevel isabove T[n], control is transferred to block 356 and 358, whichrespectively increment n and then check whether n has reached the top ofthe array. If the top of the array has not been reached, another loop isinitiated to compare BufferLevel to the next threshold. If the top hasbeen reached, control passes to block 364. If, however, block 354 founda T[n] greater than BufferLevel prior to reaching the end of thethreshold array, control passes through block 360 before passing toblock 364. Block 360 checks n, and if n is zero (BufferLevel below allthresholds), control passes to block 362 where the routine waits for thenext evaluation time. Block 364 generates a PFCP flow control frame, andincludes subblocks for calculating packet length (block 366) and a loopfor generating service fields for the SIDs to be paused (blocks 370,372, and 374). Note that an array of PauseTimes is used to generate theframe, allowing each SID to have a unique PauseTime.

Flow chart 350 could have additional levels of complexity, some of whichwere suggested above for flow chart 300 (FIG. 14). Other possibilitiesinclude basing PauseTimes on recently observed statistics for thebandwidth occupied by various service classes—this suggestion recognizesthat flow control may be ineffective if it does not affect the majorusers of bandwidth. Such statistics could be made available from ingresstraffic manager 104 (FIG. 3).

When flow control packets are generated by one PPP endpoint, the PPPpeer of that endpoint has agreed to detect and respond to those packets.FIG. 17 shows an exemplary packet-processing flow chart 310 for a devicethat can receive either SFCP or PFCP frames. As ingress frames areprocessed by, e.g., PoS interface 94 of FIG. 3, blocks 312 and 314compare the ingress frame protocol field value to the values thatsignify an SFCP or PFCP frame. If an ingress frame protocol field hasneither value, block 316 passes the frame to the packet processor(assuming that the protocol is not another recognized PPP frame type,such as an LCP, PAP, or CHAP frame. In reality, a check to see if thefirst octet of the protocol contains 0xc0 or higher could be used as aprefilter for all these protocol types as well as SFCP and PFCP). Block318 then gets the next frame header and the process repeats.

When the frame protocol matches the SFCP protocol type, controltransfers to block 320 for a check as to whether SFCP was negotiated andis active for the link. If not, block 322 discards the frame, and couldalso Possibly generate a LCP Protocol-Reject frame back to the peer. IfSFCP is active and negotiated, the PauseTime transmitted by the peer isextracted from the frame at block 324. Block 326 sets a resume timer andsignals a stop of egress packet flow, e.g. to egress traffic manager 106over signal line 122 of FIG. 3. At the expiration of the timer, anothersignal can restart egress packet flow.

When the packet processor can recognize and respond to IEEE802.3x PAUSEcontrol frames, as can packet processor 116 of FIG. 4, blocks 324 and326 are unnecessary. Instead, the SFCP frame can be repackaged as anIEEE802.3x PAUSE control frame and passed to packet processor 116 forflow pausing.

When the frame protocol matches the PFCP protocol type, control passesfrom block 314 to block 330 for a check as to whether PFCP wasnegotiated and is active for the link. If not, block 332 can takediscard action similar to that of block 322. If PFCP is active andnegotiated, block 324 extracts two arrays of N values from the frame, aService ID array SID[n] and a pause time array PauseTime[n]. Block 326then signals egress traffic manager to stop each ID in SID[n] for thecorresponding PauseTime[n]. Note that flowchart 310 will likely includeadditional steps to check that the transmitted flow control fields makesense—such steps have been omitted for clarity.

Several embodiments have been presented herein. Those skilled in the artwill recognize that depending on the particular packet-processingdevice, PPP flow control functionality could be embodied in hardware,software, or a mixture of the two. For a software embodiment, anembodiment can comprise computer instructions contained on acomputer-readable medium, i.e., optical, magnetic, or semiconductorstorage devices. When such instructions are executed or interpreted byone or more processors within a packet-processing device, they cause thepacket-processing device to perform PPP flow control functions such asdescribed above.

Although the currently published PPP implementation has been referencedherein, it is recognized that PPP will likely evolve in the future, orthat other PPP-like protocols are Possible. The scope of the attachedclaims is intended to cover all such point-to-point data link layerprotocols, but not protocols that operate at different layers (such asTCP), or protocols such as IEEE802.3, which use source/destinationaddressing and are operable on multiple-access data links.

1. A method of operating a packet-processing device comprising: receiving a point-to-point protocol packet stream from a point-to-point protocol peer over a point-to-point protocol full-duplex data link; scanning the protocol type field of packets in the stream for a frame having a point-to-point flow control protocol type; and when a point-to-point flow control frame is detected in the packet stream, decoding the contents of that frame, and adjusting the flow rate of an ongoing outbound packet stream on the data link according to at least one flow control instruction contained in that flow control frame.
 2. The method of claim 1, wherein multiple point-to-point flow control frame protocol types can exist in the packet stream, and wherein the decoding and adjusting methods differ depending on the flow control frame protocol type.
 3. The method of claim 1, wherein decoding the contents of a flow control frame comprises repackaging that frame as a flow control frame of another protocol recognizable by a downstream processor within the device.
 4. The method of claim 3, wherein adjusting the flow rate comprises recognizing the repackaged flow control frame at the downstream processor and adjusting the flow rate of the outgoing packet stream prior to point-to-point protocol processing.
 5. The method of claim 3, wherein the another protocol is IEEE802.3x and the downstream processor functions as an IEEE802o3 media access controller.
 6. The method of claim 1, wherein decoding the contents of a flow control frame comprises: depackaging flow control instructions identified by a service identifier; communicating the depackaged flow control instructions to a packet scheduler; and adjusting the flow rate of packets corresponding to the service identifier and destined for the outgoing data stream, according to the flow control instructions. 